package com.kongxr.opengltest.mygles;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.view.SurfaceHolder;

public class MyGlSurfaceView extends GLSurfaceView {
        private final MyGlRender renderer;

        public MyGlSurfaceView(Context context) {
            super(context);
            // Create an OpenGL ES 2.0 context
            setEGLContextClientVersion(2);

            renderer = new MyGlRender();

            // Set the Renderer for drawing on the GLSurfaceView
            setRenderer(renderer);
            setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
        }

        @Override
        public void surfaceCreated(SurfaceHolder holder) {
            super.surfaceCreated(holder);
        }

        @Override
        public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
            super.surfaceChanged(holder, format, w, h);
        }

        @Override
        public void surfaceDestroyed(SurfaceHolder holder) {
            super.surfaceDestroyed(holder);
        }
}
